<%@page import="java.sql.SQLException"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>

<%
	Connection connection = null;

	String host = application.getInitParameter("host");
	String port = application.getInitParameter("port");
	String nameBD = application.getInitParameter("nameDB");
	String userName = application.getInitParameter("userNameDB");
	String password = application.getInitParameter("passwordDB");
	String url = new StringBuilder("jdbc:mysql://").append(host)
			.append(":").append(port).append("/").append(nameBD)
			.append("?useUnicode=true&characterEncoding=UTF-8")
			.toString();

	Class.forName("com.mysql.jdbc.Driver").newInstance();
	connection = DriverManager.getConnection(url, userName, password);
%>